﻿///////////////////////////////////////////////////////////////
// Projet serveur entreprise
// Authors: Pierre Corsini, Guillaume Blanc
// mars 2011
///////////////////////////////////////////////////////////////

using System;
using System.Collections.Generic;

using System.Text;

namespace DLL
{
    public class Compte
    {
        private int _id;
        public int Id
        {
            get { return _id; }
            set { _id = value; }
        }

        private int _idClient;
        public int IdClient
        {
            get { return _idClient; }
            set { _idClient = value; }
        }

        private double _solde;
        public double Solde
        {
            get { return _solde; }
            set { _solde = value; }
        }

        private string _libelle;
        public string Libelle
        {
            get { return _libelle; }
            set { _libelle = value; }
        }

        public string StringRepresentation
        {
            get { return this.ToString(); }
            set { }
        }



        public Compte() { }

        public Compte(int id, int idclient, double solde, string libelle)
        {
            this._id = id;
            this._idClient = idclient;
            this._solde = solde;
            this._libelle = libelle;
        }

        public override string ToString()
        {
            return String.Format("[{0}] client:{1}, solde:{2}, lib:{3}", Id, IdClient, Solde, Libelle);
        }
    }
}
